public class DispenseState extends State{
    private Activity activity;

    public DispenseState(Activity activity) {
        this.activity = activity;
    }

    @Override
    public void deductMoney() {
        System.out.println("很抱歉,不能扣除积分");
    }

    @Override
    public boolean raffle() {
        System.out.println("很抱歉,不能抽奖");
        return false;
    }

    @Override
    public void dispensePrize() {
        if (activity.getPrizeCount()>0){
            activity.setState(activity.getNoRaffleState());
            System.out.println("恭喜你,请领取你的奖品");
        }
    }
}
